package com.dnjn.happiness.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dnjn.happiness.biz.domain.Training;
import com.dnjn.happiness.biz.domain.TrainingRecordVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisAppriseVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 发起培训Mapper接口
 *
 * @author amber
 * @date 2023-10-11
 */
public interface TrainingMapper extends BaseMapper<Training> {
    /**
     * 查询发起培训
     *
     * @param trainingId 发起培训主键
     * @return 发起培训
     */
    public Training selectTrainingByTrainingId(String trainingId);

    /**
     * 查询发起培训列表
     *
     * @param training 发起培训
     * @return 发起培训集合
     */
//    public List<Training> selectTrainingList(Training training);

    /**
     * 新增发起培训
     *
     * @param training 发起培训
     * @return 结果
     */
    public int insertTraining(Training training);

    /**
     * 修改发起培训
     *
     * @param training 发起培训
     * @return 结果
     */
    public int updateTraining(Training training);


    Page<Training> pageCommentVoByMap(Page page, @Param("map") Map<String, Object> example);


    Page<Training> listQueryByMy1(@Param("initiator") Long initiator, Page page);

    Page<Training> listQueryByMyInTo(@Param("userid") Long userid, @Param("trainingRecordStatus") String trainingRecordStatus, Page page);

    Page<Training> listQueryByMy(@Param("dto") TrainingRecordVO domain, Page page);

    int getTraingRecordNotJoin(@Param("userId")Long userId,@Param("time") String time);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTraining(@Param("label") String label, @Param("symbol") String symbol, Page page);


    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingMap(@Param("map") Map<String, String> map, Page<Object> happiness_score);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingList(@Param("vo") StatisticalAnalysisAppriseVO voList, Page<Object> happiness_score);

    List<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingList1(@Param("vo") StatisticalAnalysisAppriseVO vo);

    int getY(@Param("userId") Long userId,@Param("time") String time);

}
